package com.dd.cloud.user.service.chknowl;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dd.cloud.user.entity.chknowl.ChknowlBooksCtlg;
import com.dd.cloud.user.req.chknowl.ChknowlBooksCtlgReq;
import com.dd.cloud.user.req.chknowl.ChknowlBooksUpdateReq;
import com.dd.cloud.user.res.chknowl.ChknowlBooksChapterRes;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * <p>
 * 古籍目录表 服务类
 * </p>
 *
 * @author czg
 * @since 2022-07-04
 */
public interface IChknowlBooksCtlgService extends IService<ChknowlBooksCtlg> {

    /**
     * 保存word文档里的古籍文章到数据库
     * @param files
     */
    String saveBooksFromWord(MultipartFile[] files, String category);

    /**
     * 查询书籍的目录
     * @param bookId
     * @return
     */
    List<ChknowlBooksCtlg> getChknowlBooksCtlgList(Integer bookId);

    /**
     * 通过书籍id和目录层级查询内容
     * @param bookId
     * @param rank
     * @return
     */
    ChknowlBooksCtlg getBooksCtlgContent(Integer bookId, Integer rank);

    /**
     * 添加书籍目录
     * @param req
     */
    void addBooksCtlg(ChknowlBooksCtlgReq req);

    /**
     * 修改书籍目录内容
     * @param req
     */
    void updateBooksCtlg(ChknowlBooksUpdateReq req);
}
